import service from "@/result/index";
// 获取登录Key
export function GetqrCodeLoginKey(params) {
    return service.get('/login/qr/key?timestamp='+params)
}
// 二维码生成接口
export function GetqrCodeLoginImg(key) {
    return service.get('/login/qr/create?qrimg=true&key=' + key)
}
// 二维码状态查询接口
export function GetqrCodeLoginCheck(key, timestamp) {
    return service.get('/login/qr/check?key=' + key + '&timestamp=' + timestamp)
}
// 退出登录
export function LogOut(key, timestamp) {
    return service.get('/logout')
}
// 获取账号信息
export function GetUserAccount(timer) {
    return service.get('/user/account'+'?time='+timer)
}
// 歌单外链转换
export function GetUrlTransition(url) {
    return service.get(url)
}
// 获取推荐歌单
export function GetBanner(params) {
    return service.get(`/banner?type=0`)
}
// 获取歌单歌曲
export function Getplaylist(params) {
    return service({
        method:"GET",
        url:`/playlist/detail?id=${params}`
    })
}
// 获取用户歌曲
export function GetUserplaylist(params) {
    return service({
        method:"GET",
        url:`/user/playlist?uid=${params}`
    })
}
// 获取歌曲详情 ids可以为多个id用,分开
export function Getplaylistssss(ids) {
    return service({
        method:"GET",
        url: `/song/detail`,
        params: {
            ids:ids
        }
    })
}
// 获取热门歌单
export function GetHotplaylist(order = 'hot', cat = '', limit = 5, offset = 0 ) {
    return service.get(`/top/playlist?limit=${limit}&order=${order}&cat=${cat}&offset=${offset}`)
}
// 获取歌词 传入歌曲id
export function GetLyric(id) {
    return service.get(`/lyric?id=${id}`)
}
/**
                     *  @return {Object} 
                     */
// 获取为你推荐歌单
export function GetTuijianMusicS() {
    return service.get(`/recommend/resource`)
}
// 获取用户信息 , 歌单，收藏，mv, dj 数量
export function Getsubcount() {
    return service.get(`/user/subcount`)
}